/**
 * 
 */
package cloud.simple.web;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cloud.simple.model.User;
import cloud.simple.service.UserService;

/**
 * @author zhaodarong
 *
 */
@RestController
public class UserController {
	
	@Resource
	UserService userService;
	
	@RequestMapping(value="/users")
	public ResponseEntity<List<User>> readUserInfo() {
		List<User> users = userService.searchAll();
		
		return new ResponseEntity<List<User>>(users, HttpStatus.OK);
	}

}
